//
//  FilterViewController.swift
//  testRxSwift
//
//  Created by 火星人 on 2017/7/25.
//  Copyright © 2017年 火星人. All rights reserved.
//

import UIKit
import RxSwift

class FilterViewController: BaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        self.view.addTapWithHandle { (tap) in
            
            let dbag = DisposeBag()
            
            Observable.of(1, 3, 2, 5, 3, 2, 5, 4)
                .filter({ (value) -> Bool in
                    return value < 4
                })
                .subscribe({ (eve) in
                    print(eve)
                })
                .disposed(by: dbag)
        }
        
    }
}
